import time
from datetime import datetime

def format_time(timestamp: float) -> str:
    """格式化时间戳为字符串"""
    return datetime.fromtimestamp(timestamp).strftime("%Y-%m-%d %H:%M:%S")